<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="*|/"><xsl:apply-templates/></xsl:template>

<xsl:template match="text()|@*"><xsl:value-of select="."/></xsl:template>

<xsl:template match='nbsp' name='nbsp'>
<xsl:text disable-output-escaping='yes'>&amp;nbsp;</xsl:text>
</xsl:template>

<xsl:include href='../xsl.include.main.xsl'/>

<xsl:template match="forum">

<xsl:variable name="authlevel">
  <xsl:value-of select="@authlevel"/>
</xsl:variable>


<table class="gbox" border="0" cellspacing="0" cellpadding="4" background="/imgs/serpente.gif" style="background-position:top right;background-repeat: no-repeat;" >

<tr>
	<td colspan="4" align="center">Forum: <xsl:value-of select="@title"/>
	</td>
</tr>

<tr>

<td colspan="2" align="center" valign="middle">
<b>
	<xsl:if test="floor( $authlevel div 131072 ) mod 2">
  	<a href="/forumShow.aspx?forumid={@forumid}&amp;msgid={@msgid}&amp;deleteIt=2&amp;forumStep={/forum/@forumStep}&amp;forumPage={/forum/@forumPage}"><img border="0" src="/imgs/delete.gif"/>&#160;Elimina spam!</a>
	</xsl:if>
	</b>
	</td>

<td colspan="2" align="center" valign="middle">
<b>
<xsl:if test="floor( $authlevel div 8192 ) mod 2">
	  <xsl:if test="@public=2 or public=3">
	   	<a style="color:green;" href="/forumShow.aspx?forumid={@forumid}&amp;msgid={@msgid}&amp;deleteIt=3&amp;forumStep={/forum/@forumStep}&amp;forumPage={/forum/@forumPage}"><img border="0" src="/imgs/markedyes.gif"/>&#160;Ripristina il messaggio!</a>
		</xsl:if>
		<xsl:if test="@public=0">
			<a href="/forumShow.aspx?forumid={@forumid}&amp;msgid={@msgid}&amp;deleteIt=1&amp;forumStep={/forum/@forumStep}&amp;forumPage={/forum/@forumPage}"><img border="0" src="/imgs/delete.gif"/>&#160;Cancella il messaggio!</a>

		</xsl:if>

	</xsl:if>

</b></td>

</tr>

<tr bgcolor="#787878" height="1px"><td colspan="4"></td></tr>

<xsl:for-each select="message">

<tr class="body_red">

<td>
<xsl:choose>
	<xsl:when test='/forum/@logged'>
		<a style="color:#006699;" href="/post2forum.aspx?forum_id={/forum/@forumid}&amp;msgid={@msgid}&amp;forumStep={/forum/@forumStep}&amp;forumPage={/forum/@forumPage}">Rispondi<br/>al messaggio</a>
	</xsl:when>
	<xsl:otherwise>
		<span class="body_10px_red" style="color:#006699; cursor:pointer; text-decoration: underline;" onmouseover="ShowTooltipRight('1scrivi');" onmouseout="HideTooltip('1scrivi');"><nobr>Rispondi<br/>al messaggio</nobr></span>
	</xsl:otherwise>
</xsl:choose>
</td>

<td colspan="2">scritto da
	<xsl:choose>
		<xsl:when test='@ngId'>
			<xsl:value-of select="@ngFrom"/>
		</xsl:when>
		<xsl:otherwise>
	<xsl:call-template name="user">
		<xsl:with-param name="status" select="@uStatus"/>
		<xsl:with-param name="sexid" select="@sexid"/>
		<xsl:with-param name="certified" select="@certified"/>
		<xsl:with-param name="userid" select="@userid"/>
		<xsl:with-param name="nick" select="@nick"/>
	</xsl:call-template>
		</xsl:otherwise>
	</xsl:choose>

	</td>

	<td>in data <span class="nick" style="color:#006699"><xsl:value-of select="@time"/></span></td>

</tr>

<tr bgcolor="#787878" height="1px"><td colspan="4"></td></tr>

<tr bgcolor="#f4efdf">

<td colspan="4">
<xsl:choose>
	<xsl:when test="@public=2 and not (floor($authlevel div 8192) mod 2)">
		<b>Messaggio cancellato!</b>
	</xsl:when>
	<xsl:otherwise>
		<xsl:call-template name="lf2br">
		<xsl:with-param name="text" select="@text"/>
		</xsl:call-template>
	</xsl:otherwise>
</xsl:choose>
</td>

</tr>

<tr bgcolor="#787878" height="1px"><td colspan="4"></td></tr>

<tr class="body_red">

<td>

</td>
<td colspan="2">
</td>

<td align="right">
<xsl:choose>
	<xsl:when test="@public=2">
	</xsl:when>
	<xsl:when test='/forum/@logged and @public!=2'>
		<a style="color:#006699;" href="/post2forum.aspx?forum_id={/forum/@forumid}&amp;msgid={@msgid}&amp;forumStep={/forum/@forumStep}&amp;forumPage={/forum/@forumPage}">Rispondi<br/>al messaggio</a>
	</xsl:when>
	<xsl:otherwise>
		<span class="body_10px_red" style="color:#006699; cursor:pointer; text-decoration: underline;" onmouseover="ShowTooltipRight('1scrivi');" onmouseout="HideTooltip('1scrivi');"><nobr>Rispondi<br/>al messaggio</nobr></span>
	</xsl:otherwise>
</xsl:choose>
</td>

</tr>
</xsl:for-each>

</table>

<DIV CLASS="reminderTooltip" style="width:165;" ID='tt1scrivi'>
Guarda che se non ci dici chi sei non puoi scrivere un bel forum di niente! Dai, loggati o registrati.....
</DIV>
</xsl:template>

</xsl:stylesheet>